home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / castools.zip / FUNC12H.ASM < prev    next >
Assembly Source File  |  1990-01-05  |  1KB  |  44 lines

  1. Include multi.inc
  2. Include model.inc
  3.  
  4. ;==============================================================================
  5. ;
  6. ;   CAS function 12h -- Get Hardware Status
  7. ;
  8. ;   Format:
  9. ;               int CASGetHardwareStatus (HWSTAT *buffer)
  10. ;   Input:
  11. ;               pointer to hardware status structure
  12. ;   Output:
  13. ;               Returns 0 if successful or negative error code
  14. ;               fills hardware status buffer
  15. ;==============================================================================
  16.  
  17.                 .CODE
  18. CASGetHardwareStatus    PROC    arg1:PTR WORD
  19.  
  20.                 push    dx              ; save registers
  21.                 push    ds
  22.  
  23.                 mov     ax,MUX          ; load multiplex number
  24.                 mov     ah,al           ; move into ah
  25.                 mov     al,12h          ; CAS function 12
  26.         IF      @DataSize               ; large and medium models
  27.                 lds     dx,arg1         ; pointer to SFTR
  28.         ELSE
  29.                 mov     dx,arg1         ; pointer to SFTR
  30.         ENDIF
  31.                 int     2Fh
  32.                 cmp     ax,0            ; call successful?
  33.                 je      FINISH          ; don't modify ax
  34.                 mov     ax,1            ; failure code
  35. FINISH:
  36.                 pop     ds              ; restore registers
  37.                 pop     dx
  38.                 ret
  39. CASGetHardwareStatus    endp
  40.  
  41.                 END
  42.  
  43.  
  44.